<?php
class ClassMission extends Zend_Db_Table
{
	protected $_name ="class_mission";
	protected $_primary = 'id';

 //根据id 查询class_mission
    public function getclass_missionByid($id){
          $select = $this->select();
          $select->where("id=".$id);
          return $this->fetchAll($select)->toArray();
    }

 //根据id 查询class_mission
    public function getclass_missionByclass_id($class_id){
          $select = $this->select();
          $select->where("class_id=".$class_id);
          return $this->fetchAll($select)->toArray();
    }

 //更新class_mission
    public function updateclass_missionByid($array,$id){
        
		$db = $this->getAdapter();
		$where=$db->quoteInto('id = ?', $id);
		$this->update($array, $where);
                return true;
	}
//删除class_mission
     public function delclass_missionByid($id){
          $where = 'id = '. $id;
         $this->delete($where);
         return true;
    }


}

